var exp = module.exports;


exp.Code = {
    SUC: 200,
    NOT_REGISTER: 400,
    PHONE_EMPTY_ERR: 401,
    ERR: 500
}

exp.Msg = {
    RESULT_SUCCESS: 'ok',
    MISSING_PARAMETER: '缺失参数',
    USER_NOT_FOUND: '用户未找到',
    NO_SERVER_AVAILABLE: '没有可用的服务器',
    QUERY_FAILED: '查询失败',
    GET_JSON_DATA_ERR: '获取预设数据失败',
    ONLY_ONCE_ERR: '只能提取一次该额度',
    CAN_NOT_WITHDRAW: '暂时不能提现',
    INSUFFICIENT_FUNDS_ERR: '余额不足',
    SUBMIT_ERR: '提交失败',
    LEVEL_REQUIRE: '未达到层数要求',
    APPRENTICE_REQUIRE: '未达到徒弟数要求',
    DISCIPLE_REQUIRE: '未达到徒孙数要求',
    FLOOR_ERR: '矿层错误',
    FLOOR_NOT_FOUND: '找不到矿层信息',
    RECEIVE_CHEST_TIME_ERR: '未到达宝箱开启时间',
    RECEIVE_CHEST_UNR_ERR: '宝箱奖励还未领取',
    RECEIVE_CHEST_EMPTY_ERR: '宝箱为空',
    ORDINARY_CHEST_NUM_ERR: '普通宝箱数量不足',
    SUPERIOR_CHEST_NUM_ERR: '高级宝箱数量不足',
    TIME_OUT: '请求超时',
    FLOOR_NOT_OPEN: '矿层未解锁',
    LEVEL_MAX_ERR: '当前矿层已满级',
    REGISTER_PHONE_ERR: '手机号不能为空',
    PHONE_EMPTY_ERR: '手机号为空',
    PHONE_ALREADY_EXISTS_ERR: '手机号已存在',
    REGISTER_CODE_ERR: '验证码错误',
    USER_NOT_REGISTER: '用户未注册',
    HAVE_NOT_OFFLINE_REWARD: '没有离线奖励',
    TICKET_WRONG_ERR: '无法领取奖励',
    CHEST_STATUS_ERR: '不在开启状态，无法减少时间',
    VIDEO_NUM_ERR: '看视频次数已到今天上限',
    LOTTERY_INSUFFICIENT_ERR: '抽奖次数不足',
    WITHDRAW_ERR: '提现失败',
    INVALID_CHEST_TICKET: '无效的宝箱凭证',
    DATA_ERR: '数据异常',
    REGISTERED_ERR: '已经注册',
    SIGN_DONE: '本日已经签到',
    SIGN_CANT: '还没到签到日期',
    NEW_PLAYER_PRIZE_GONE: '已经领取过新手奖励',
    NET_WORK_BUSY: '服务器网络忙',
    GIVE_OIL_ERR: '交易数额不合法',
    GIVE_OIL_ERR1: '交易对象不存在',
    GIVE_FAILD: '交易失败',
    GIVE_FAILD_SELF: '交易失败,不能和自己交易',
    GIVE_FAILD_1: '交易失败,石油不够',
    OIL_INSUFFICIENT: '石油不足',
    VIDEO_NUM_INSUFFICIENT: '看满30次视频才能领取奖励'
}

exp.Configuration = {
    SALT: 'salt_0004',
    IP_ADDR: '39.98.74.164',
    // IP_ADDR: '171.120.24.61',
    GRAPH_PATH: 'graphs.tsingmuth.com',
    OPERATE_HOST: '39.98.74.164',
    OPERATE_PORT: 8080
}

exp.PushRoute = {
    BALANCE_REDUCE: 's2c_balance_reduce', //用户余额减少
    COINS_REDUCE: 's2c_coins_reduce', //用户金币减少
    COINS_INCREASE: 's2c_coins_increase', //用户金币增加
    CHEST_INCREASE: 's2c_chest_increase', //用户宝箱增加
    WELFARE_APPEAR: 's2c_welfare_appear',//福利时刻
    PRODUCT_COINS_CHANGE: 's2c_product_coins_change', //秒产金量变化
    LOTTERY_TICKET_CHANGE: 's2c_lottery_ticket_change', //抽奖券数量变更
    VIDEO_NUM_INCREASE: 's2c_video_num_increase', //看视频次数增加
    CHEST_START_COUNT_DOWN: 's2c_chest_start_count_down',   //宝箱倒计时开始
    CHEST_COUNT_DOWN_END: 's2c_count_down_end',   //宝箱倒计时开始
}

exp.Constant = {
    ORDINARY_TREASURE_TIME: 900, // 普通宝箱开启时间
    ORDINARY_TREASURE_COINS_PROBABILITY: 85, // 普通宝箱开启金币概率
    ORDINARY_TREASURE_COINS_MIN_M: 5, // 普通宝箱获得金币最小倍率
    ORDINARY_TREASURE_COINS_MAX_M: 10, // 普通宝箱获得金币最大倍率
    ORDINARY_TREASURE_JEWEL_M: 10, // 普通宝箱获得宝石倍率
    SUPERIOR_TREASURE_TIME: 3600, // 高级宝箱开启时间
    SUPERIOR_TREASURE_COINS_PROBABILITY: 75, // 高级宝箱开启金币概率
    SUPERIOR_TREASURE_COINS_MIN_M: 10, // 高级宝箱获得金币最小倍率
    SUPERIOR_TREASURE_COINS_MAX_M: 20, // 高级宝箱获得金币最大倍率
    SUPERIOR_TREASURE_JEWEL_M: 5, // 高级宝箱获得宝石倍率
    REDUCE_TREASURE_TIME: 3600, // 看视频减少开启宝箱时间
    DAILY_VIDEO_TIME: 30, // 每日看视频次数
    VIDEO_INCREASE_LOTTERY: 3, //看视频增加的抽奖次数
    TOTAL_JEWEL: "TOTAL_JEWEL", // redis 总宝石量key
    TOTAL_MONEY: "TOTAL_MONEY", // redis 总广告金额key
    SMS: "{SMS}_",
    APPRENTICE_FULL_HELP_NUM: 10, // 徒弟助力成功提升金币数
    APPRENTICE_UN_FULL_HELP_NUM: 1, // 徒弟未助力成功提升金币数
    NEW_PLAYER_OIL: 10,//新手奖励石油
    NEW_PLAYER_COINS: 10000,//新手奖励金币
    GIVI_OIL_LIMIT: 100,//给予石油最低限制
    GIVE_OIL_TEX: [0.2, 0.15, 0.1, 0.08, 0.05, 0.03]//交易税率
}

exp.MoneyType = {
    OIL: "oil",//石油
    GOLD: "gold",//金币
}

exp.LockKey = {
    WELFARE: 'welfare_lock', //福利时刻抽奖
    DAILY_MISSION_LOCK: 'daily_mission_lock', //每日视频次数锁
    BONUS_RECEIVE_LOCK: 'bonus_receive_lock', //分红领取锁
    WITHDRAW_LOCK: 'withdraw_lock', //提现锁
    MACHINE_LOCK: 'machine_lock', //矿机锁
    SIGN_GET: 'sign_get'//签到锁
}

exp.RedisPrefix = {
    SIGN: "sign_week_",//签到缓存
    DAILY_MISSION_PREFIX: 'daily_mission_', //每日任务缓存
    WORLD_RANK_PREFIX: 'world_rank_list', //世界排行缓存
    WORLD_RANK_GUARDIAN_PREFIX: 'world_rank_guardian', //世界排行穿透防护
    OIL_DETAIL_PREFIX: 'oil_detail_page_', //用户石油明细缓存
    MONEY_DETAIL_PREFIX: 'money_detail_page_', //用户金钱收益明细缓存
    SON_LIST_PREFIX: 'son_list_page_', //用户徒弟数据缓存
    GRAND_SON_LIST_PREFIX: 'grand_son_list_page_', //用户徒孙数据缓存
    PAGE_PREFIX: 'page_', //页码key
    CHEST_LIST_PREFIX: 'chest_list_', //用户宝箱数据缓存
    WITHDRAW_PREFIX: 'withdraw_log_', //用户提现记录
    INCOME_PREFIX: 'income_list_page_', //用户收益明细
    BONUS_PREFIX: 'bonus_list_page_', //分红收益明细缓存
    BONUS_RECORD: 'bonus_record_', //分红领取记录
    COMMAND_TASK: 'commander_task_', //百团任务
    PROFIT_PREFIX: 'profit_qualify_length', //领取红分的资格
    PROFIT_OLD: 'profit_qualify', //分红资格旧key
    DAILY_INVITE_NUMBER: 'daily_invite_number_', //单日邀请记录
    MACHINE_TOTAL_JEWEL: 'machine_total_jewel', //矿机全网矿石总量
    DOUBLE_REWARD: 'double_reward_:', //双倍奖励
    DOUBLE_REWARD_END: 'double_reward' //双倍奖励
}

exp.OIL_ADD_TYPE = {
    WELFARE: "welfare",
    SIGN: "sign",
    NEW_PLAYER_PRIZE: "new_player_prize",
    GIVE_OIL: "give_oil",
    PURCHASE_MACHINE: "purchase_machine"
}

exp.qiniu = {
    AK: "yvamrnYeh7pIRCMYVQpsC949ut9tOTYH6T3pfx2r",
    SK: "tvOoFXjiMT7iQ5jGnRCPNyxv7G0PBeoKjboAHfey",
    Zone: "leyoutree"
}
//签到奖品
exp.price = [
    {
        num: 12
    },
    {
        num: 13
    },
    {
        num: 14
    },
    {
        num: 15
    },
    {
        num: 16
    },
    {
        num: 17
    },
    {
        num: 18
    }
]
//福利时刻奖品
exp.waelfare = [1, 2, 3, 4, 5, 6, 7, 8, 9];
